package cn.edu.ssm.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.edu.ssm.entity.Type;
import cn.edu.ssm.service.TypeService;


@Controller
@RequestMapping("/manage")
public class TypeController {
    @Autowired
    private TypeService typeService;

    //显示分类管理页面
    @RequestMapping("/typemanage.action")
    public String getUser(Model model) throws Exception {
    	List<Type> list=typeService.getTypelist();
    	model.addAttribute("list",list);
    	model.addAttribute("url", "typemanage");
    	return "manage/type_manage";
    }
   
}
